package com.inspinia.upms.rpc.service;

import com.inspinia.base.dao.BaseDao;
import com.inspinia.base.service.BaseServiceImpl;
import com.inspinia.upms.common.model.app.App;
import com.inspinia.upms.dao.ApplicationDao;
import com.inspinia.upms.rpc.api.ApplicationService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author Veblen
 */
@Service
public class ApplicationServiceImpl extends BaseServiceImpl<App> implements ApplicationService {

    @Resource
    private ApplicationDao applicationDao;

    @Override
    public List<App> findApplicationIsEnable() {
        return applicationDao.findApplicationIsEnable();
    }

    @Override
    public App findAppByName(String sysName) {
        return applicationDao.findByName(sysName);
    }

    @Override
    public List<App> findAll() {
        return applicationDao.findAll();
    }

    @Override
    protected BaseDao<App> getDao() {
        return applicationDao;
    }
}
